<template>
  <div id="app">
    <editor
      api-key="q0067g07wq9mo8ykgah7cngwkffdyi4elqnxkw9ztz0wq6jr"
    :init="{
    height: 800,
    language: 'zh_CN',
    menubar: false,
    plugins: [
    'advlist autolink lists link image charmap print preview anchor',
    'searchreplace visualblocks code fullscreen',
    'insertdatetime media table paste code help wordcount'
    ],
  toolbar: [
          'undo redo | cut copy paste pastetext | selectall | codesample code | searchreplace visualblocks fullscreen preview print',
          'bold italic underline strikethrough subscript superscript | forecolor backcolor | removeformat',
          'fontselect fontsizeselect formatselect', 'alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | checklist',
          'link unlink anchor image media ',
          'table tabledelete | tableprops tablerowprops tablecellprops | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol'
        ],
        fontsize_formats: '8px 10px 12px 14px 16px 18px 24px 36px', // 自定义字体大小选项
        content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' // 默认字体样式
   }"
    v-model="content"
    />
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancelAction('ruleForm')">取 消</el-button>
      <el-button :loading="loading" type="primary" @click="addAction">确 定</el-button>
    </div>
  </div>

</template>

<script>
import Editor from '@tinymce/tinymce-vue';

export default {
  name: 'App',
  components: {
    Editor
  },
  data() {
    return {
      content: '',
      loading:false
    };
  },
  methods: {
    addAction() {
      console.log(this.content)
    }
  }
};
</script>
